<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/common/include.jsp"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>IRD Web Applications</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" />

<!-- jquery-->
<!--[if lt IE 9]>
<script type="text/javascript" src="${jqueryuiPath}/jquery-1.10.2.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script type="text/javascript" src="${easyuiPath}/jquery.min.js"></script>
<!--<![endif]-->

<!-- easyui-->
<link rel="stylesheet" type="text/css" href="${easyuiPath}/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${easyuiPath}/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${easyuiPath}/demo/demo.css">
<script type="text/javascript" src="${easyuiPath}/jquery.easyui.min.js"></script>

<script type="text/javascript" src="${easyuiPath}/plugins/jquery.serializeJSON.js"></script>
<script type="text/javascript" src="${jsPath}/tools.js"></script>

<!-- jqueryui-->
<link rel="stylesheet" type="text/css" href="${jqueryuiPath}/themes/base/jquery.ui.theme.css" />

</head>

<body>
	<h2>IRD Web Applications</h2>
	<div class="demo-info">
		<div class="demo-tip icon-tip"></div>
		<div style="width:1000px">
		<table>
			<tr>
				<td>WARNING NOTICE</td>
			</tr>
			<tr>
				<td>IT IS A CRIMINAL VIOLATION TO ACCESS TAXPAYER RECORDS OTHER THAN FOR THE PERFORMANCE OF OFFICIAL DUTIES.THE CONSEQUENCES CAN BE SEVERE FOR ANYONE WHO DOES.</td>
			</tr>
			<tr>
				<td>DO NOT MAKE UNAUTHORISED ACCESS TO TAXPAYER RECORDS!</td>
			</tr>
		</table>
		</div>
	</div>
	<div style="margin:10px 0;"></div>
	<div class="easyui-panel" title="Please login" style="width:1000px">
		<div style="padding:10px 0 10px 60px">
		<c:choose>
		<c:when test="${param.fail == true}">
			<div id="errMsgDiv" class="ui-state-error ui-corner-all" style="width:95%">
				<p><span class='ui-icon ui-icon-alert' style='float: left'></span><strong>
					<spring:message code="login.fail"/>
				</strong></p>
			</div>
		</c:when>
		<c:otherwise>
			<div id="errMsgDiv" class="ui-state-error ui-corner-all" style="width:95%;display:none"></div>
		</c:otherwise>
		</c:choose>
		
	    <form id="ff" action="<c:url value='/j_spring_security_check' />" validateUrl="<c:url value='/validateLogin' />" method='post'>
	    	<table>
				<tr>
					<td>Username</td>
					<td><input type='text' name='j_username' id="j_username" value='L0DU51'>
					</td>
				</tr>
				<tr>
					<td align="left">Password</td>
					<td><input type='password' name='j_password' id="j_password" value='Du51du51'/>
					</td>
				</tr>
			</table>
	    </form>
	    </div>
	    <div style="text-align:center;padding:5px">
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="validateAndSubmitForm($('#ff'))">Login</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm($('#ff'))">Clear</a>
	    	
<!-- 	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="test($('#ff'), preTest)">test</a> -->
	    </div>
	</div>
	
</body>

<script type="text/javascript">
function test(targetForm, callback){
	alert("test:"+(typeof callback));
	
}

</script>
